<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="com.atguigu.EL_JSTL.Student" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: dongsong
  Date: 2021/7/20
  Time: 1:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    List<Student>studentList=new ArrayList<>();
    for(int i=1;i<10;i++){
        studentList.add(new Student(i,"username+i","pass"+i,18+i,"phone"+i));

    }
    request.setAttribute("stus",studentList);
%>
<table>
    <tr>
    <th>编号</th>
    <th>用户名</th>
    <th>密码</th>
    <th>年龄/th>
    <th>电话</th>
    <th>操作</th>
    </tr>
</table>
<c:forEach begin="2" end="7" varStatus="status" items="${requestScope.stus}" var="stu">
    <tr>
        <td>${stu.id}</td>
        <td>${stu.username}</td>
        <td>${stu.password}</td>
        <td>${stu.age}</td>
        <td>${stu.phone}</td>

    </tr>
</c:forEach>

</body>
</html>
